void bubble_p(long* data, long count) {
    long *i, *last;
    for (last = data+count-1; last > data; last--) {
        for (i = data; i < last; i++) {
            if (*(i+1) < *i) {
                long t = *(i+1);
                *(i+1) = *i;
                *i = t;
            }
        }
    }
}

int main(){
		long i;
		long data[]={1,0,3,5,2,6,8,9,7,4};
		printf("待排序序列:");
		for(i=0;i<10;i++){
				printf("%ld ",*(data+i));
		}
		bubble_p(data,10);
		printf("\n排序后序列:");
		for(i=0;i<10;i++){
				printf("%ld ",*(data+i));
		}
}
